package com.fbs.wowo.correctRight.web;

import com.fbs.wowo.base.BaseController;
import com.fbs.wowo.base.Response;
import com.fbs.wowo.correctRight.entity.CopyrightWorksType;
import com.fbs.wowo.correctRight.service.CopyrightWorksTypeService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("copy")
public class CopyrightWorksTypeController extends BaseController {

    @Resource
    private CopyrightWorksTypeService copyrightWorksTypeService;

    @PostMapping("insert")
    public Response insert(CopyrightWorksType record){
        copyrightWorksTypeService.insertSelective(record);
        return success();
    }

    @GetMapping("findAll")
    public Response findAll(){
        return success(copyrightWorksTypeService.findAll());
    }


    @GetMapping("select")
    public Response select(String cwtId){
        return success(copyrightWorksTypeService.selectByPrimaryKey(cwtId));
    }



}





